//////////////////////////////////////////////////////////////////////////
#pragma once
#pragma managed
//////////////////////////////////////////////////////////////////////////
using namespace System;
using namespace System::Runtime::InteropServices;
//////////////////////////////////////////////////////////////////////////
NAMESPACE_BEGIN
//////////////////////////////////////////////////////////////////////////
/// <summary>
/// CvSURFPoint
/// </summary>
[StructLayoutAttribute(LayoutKind::Sequential)]
public value struct SURFPoint
{
	Point2D32f pt;
	int laplacian;
	int size;
	float dir;
	float hessian;
};

/// <summary>
/// CvSURFParams
/// </summary>
[StructLayoutAttribute(LayoutKind::Sequential)]
public value struct SURFParams
{
	int extended;
	double hessianThreshold;
	int nOctaves;
	int nOctaveLayers;
};

/// <summary>
/// CvMSERParams
/// </summary>
[StructLayoutAttribute(LayoutKind::Sequential)]
public value struct MSERParams
{
	/// <summary>
	/// delta, in the code, it compares (size_{i};-size_{i-delta};)/size_{i-delta};  
	/// </summary>
	int delta;
	/// <summary>
	/// prune the area which bigger/smaller than max_area/min_area
	/// </summary>
	int maxArea;
	int minArea;
	/// <summary>
	/// prune the area have simliar size to its children
	/// </summary>
	float maxVariation;
	/// <summary>
	/// the next few params for MSER of color image
	/// trace back to cut off mser with diversity < min_diversity
	/// </summary>
	float minDiversity;
	/// <summary>
	/// for color image, the evolution steps
	/// </summary>
	int maxEvolution;
	/// <summary>
	/// the area threshold to cause re-initialize
	/// </summary>
	double areaThreshold;
	/// <summary>
	/// ignore too small margin
	/// </summary>
	double minMargin;
	/// <summary>
	/// the aperture size for edge blur
	/// </summary>
	int edgeBlurSize;
};

/// <summary>
/// CvStarKeypoint
/// </summary>
[StructLayoutAttribute(LayoutKind::Sequential)]
public value struct StarKeypoint
{
	Point2D32s pt;
	int size;
	float response;
};

/// <summary>
/// CvStarDetectorParams
/// </summary>
[StructLayoutAttribute(LayoutKind::Sequential)]
public value struct StarDetectorParams
{
	int maxSize;
	int responseThreshold;
	int lineThresholdProjected;
	int lineThresholdBinarized;
	int suppressNonmaxSize;
};

/// <summary>
/// Block matching algorithm structure
/// </summary>
[StructLayoutAttribute(LayoutKind::Sequential)]
public value struct StereoBMState
{
	/// <summary>
	/// re-filtering (normalization of input images)
	/// =CV_STEREO_BM_NORMALIZED_RESPONSE now
	/// </summary>
	StereoBlockMatchFilterType preFilterType;
	/// <summary>
	/// averaging window size: ~5x5::::21x21
	/// </summary>
	int preFilterSize;
	/// <summary>
	/// the output of pre-filtering is clipped by [-preFilterCap,preFilterCap]
	/// </summary>
	int preFilterCap;
	/// <summary>
	/// correspondence using Sum of Absolute Difference (SAD)
	/// ~5x5::::21x21
	/// </summary>
	int SADWindowSize;
	/// <summary>
	/// minimum disparity (can be negative)
	/// </summary>
	int minDisparity;
	/// <summary>
	/// maximum disparity - minimum disparity (> 0)
	/// </summary>
	int numberOfDisparities;
	/// <summary>
	/// the disparity is only computed for pixels
	/// </summary>
	int textureThreshold;
	/// <summary>
	/// with textured enough neighborhood
	/// accept the computed disparity d* only if
	/// SAD(d) >= SAD(d*)*(1 + uniquenessRatio/100::)
	/// for any d != d*+/-1 within the search range::
	/// </summary>
	int uniquenessRatio;
	/// <summary>
	/// disparity variation window
	/// </summary>
	int speckleWindowSize;
	/// <summary>
	/// acceptable range of variation in window
	/// </summary>
	int speckleRange;
	/// <summary>
	/// if 1, the results may be more accurate,
	/// at the expense of slower processing 
	/// </summary>
	int trySmallerWindows;
	/// <summary>
	/// temporary buffers
	/// </summary>
	IntPtr preFilteredImg0;
	/// <summary>
	/// temporary buffers
	/// </summary>
	IntPtr preFilteredImg1;
	/// <summary>
	/// temporary buffers
	/// </summary>
	IntPtr slidingSumBuf;
	/// <summary>
	/// temporary buffers
	/// </summary>
	IntPtr dbmin;
	/// <summary>
	/// temporary buffers
	/// </summary>
	IntPtr dbmax;
};

/// <summary>
/// CvStereoGCState
/// </summary>
[StructLayoutAttribute(LayoutKind::Sequential)]
public value struct StereoGCState
{
	int Ithreshold;
	int interactionRadius;
	float K, lambda, lambda1, lambda2;
	int occlusionCost;
	int minDisparity;
	int numberOfDisparities;
	int maxIters;
	IntPtr left;
	IntPtr right;
	IntPtr dispLeft;
	IntPtr dispRight;
	IntPtr ptrLeft;
	IntPtr ptrRight;
	IntPtr vtxBuf;
	IntPtr edgeBuf;
};
//////////////////////////////////////////////////////////////////////////
NAMESPACE_END
//////////////////////////////////////////////////////////////////////////